A surface definition consists of a number of component keywords, each
of which is usually followed by either a single number or a red-green-blue
color triple. Each of the values in the color triple are normalized,
with zero indicating zero intensity, and one indicating full intensity.
If any surface component is left unspecified, its value defaults to zero,
with the exception of the index of refraction, which is assigned the
default index of refraction (normally 1.0).
Surface descriptions are used in <#673#><#2338#>rayshade<#2338#><#673#> to compute the color of a ray
that strikes the surface at a point #math169##tex2html_wrap_inline6078#. The normal to the surface
at #math170##tex2html_wrap_inline6080#, #math171##tex2html_wrap_inline6082#, is also computed.
- <#6083#><#6083#>
- <#1702#>ambient<#1702#> #math172##tex2html_wrap_inline6085#
Use the given <#680#>color<#680#> to approximate those surface-surface
interactions (e.g., diffuse interreflection) not modeled by the
ray tracing process.
A surface's ambient color is always applied to a ray. The color
applied is computed by multiplying the ambient color by the intensity
of the ambient light source.
If #math173##tex2html_wrap_inline6087# is in shadow with respect to a given light source,
that light source makes no contribution to the shading of #math174##tex2html_wrap_inline6089#.
- <#6090#><#6090#>
- <#1706#>diffuse<#1706#> #math175##tex2html_wrap_inline6092#
Specifies the diffuse color.
The diffuse contribution from each non-shadowed light source at #math176##tex2html_wrap_inline6094#
is equal to the diffuse color of the surface scaled by the cosine of
the angle between #math177##tex2html_wrap_inline6096#
and the vector from #math178##tex2html_wrap_inline6098# to the light source.
- <#6099#><#6099#>
- <#1710#>specular<#1710#> #math179##tex2html_wrap_inline6101#
Specifies the base color of specular reflections.
- <#6102#><#6102#>
- <#1714#>specpow<#1714#> <#1715#>exponent<#1715#>
Controls the size of the specular highlight. The larger
the <#698#>exponent<#698#>, the smoother the apparent finish.
The intensity of specular highlights from light sources are
scaled by the specular color of the surface.
- <#6103#><#6103#>
- <#1718#>reflect<#1718#> <#1719#>reflectivity<#1719#>
Specifies the specular reflectivity of the surface. If non-zero,
reflected rays will be spawned.
The intensity of specularly reflected rays will be proportional to
the specular color of the surface scaled by the reflectivity.
- <#6104#><#6104#>
- <#1722#>transp<#1722#> <#1723#>transparency<#1723#>
Specifies the specular transmissivity of the surface. If
non-zero,
transmitted (refracted) rays will be spawned.
- <#6105#><#6105#>
- <#1726#>body<#1726#> #math180##tex2html_wrap_inline6107#
Specifies the body color of the object. The body color
affects the color of rays that are transmitted through the
object.
- <#6108#><#6108#>
- <#1730#>extinct<#1730#> <#1731#>coefficient<#1731#>
Specifies the extinction coefficient of the interior
of the object.
The extinction coefficient is raised to a power equal to the distance
the transmitted ray travels through the object.
The overall intensity of specularly transmitted rays will be proportional to
this factor multiplied by the surface's body color
multiplied by the transparency of the object.
- <#6109#><#6109#>
- <#1734#>index<#1734#> <#1735#>N<#1735#>
Specifies the index of refraction. The default value is equal
to the index of refraction of the atmosphere surrounding the eye.
- <#6110#><#6110#>
- <#1738#>translucency<#1738#> <#1739#>translu<#1739#> #math181##tex2html_wrap_inline6112# <#1741#>stexp<#1741#>
Specifies the translucency, diffusely transmitted color,
and Phong exponent for transmitted specular highlights.
If a light source illuminates a translucent surface from the side opposite
that from which a ray approaches, illumination computations are performed,
using the given color as the surface's diffuse color, and the given
exponent as the Phong highlight exponent. The resulting color is then
scaled by the surface's translucency.